.PHONY: dev-im
wutongTcDev01=root@192.168.7.166

dev-im:
	env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o wthsjy-im-server-new
	@rsync -e 'ssh -p 22' -c wthsjy-im-server-new $(wutongTcDev01):/data/bin/wthsjy-im-server-new
	ssh $(wutongTcDev01) -p 22 "mv /data/bin/wthsjy-im-server /data/bin/wthsjy-im-server-old && mv /data/bin/wthsjy-im-server-new /data/bin/wthsjy-im-server && supervisorctl restart wthsjy-im-server"
	ssh $(wutongTcDev01) -p 22 "cat /dev/null > /data/log/wthsjy-im-server.log"
